
#ifndef __CE_GFX_GL20_VERTEXDECLARATION_GL13_H__
#define __CE_GFX_GL20_VERTEXDECLARATION_GL13_H__

#include <gfx/ivertexdeclaration.h>

struct iProgram;

/**
 * \addtogroup opengl
 * @{
 */

/**
 * @brief OpenGL implemenation of the iVertexDeclation interface.
 */

class ceVertexDeclaration : public iVertexDeclaration
{
  CE_OBJECT
private:
  unsigned					_streams;
  ceVertexElement** _elements;
  unsigned					_totalSize;
public:
  ceVertexDeclaration(const ceVertexElement* elements);
  ~ceVertexDeclaration ();

  unsigned GetNumberOfStreams() const;
  const ceVertexElement* GetElements(unsigned stream) const;
  const ceVertexElement* GetElement (ceProgramParameterName name, unsigned stream) const;
  void BindStream (iProgram* effect, unsigned stream, void* ptr);
  void UnbindStream (iProgram* program, unsigned stream);
  virtual unsigned GetTotalSize () const;
};


/**
 * @}
 */

#endif /* __CE_GFX_GL20_VERTEXDECLARATION_GL13_H__ */

